import { getAction, deleteAction, delete2Action, delete3Action, putAction, postAction, uploadAction } from '@/api/manage.js'

const parklist = (params) => getAction("company.company/getList", params)
const getQuestionList = (params) => getAction("set.question/getList", params)
const GetChainLevelList = (params) => getAction("label.chain/getList", params)

const xiangxian = {
  getList: (params) => getAction("townsmen.index/getList", params)
}

const news = {
  getList: (params) => getAction("news.business/getList", params),
  getDetail: (params) => getAction("news.business/getDetail", params),
  getType: (params) => getAction("news.business/getType", params),
}
const chain = {
  getChainInfo: (params) => getAction("label.chain/getChainInfo", params),
  getChainDetail: (params) => getAction("label.chain/getDetail", params),
}
const companyNews = {
  getList: (params) => getAction("news.opinion/getList", params),
  // getDetail: (params) => getAction("news.company/getDetail", params),
}

const company = {
  getList: (params) => getAction("company.company/getList", params),
  getDetail: (params) => getAction("company.company/getDetail", params),
  getLabel: (params) => getAction("label.label/getListOnPerform", params),
  getBusiness: (params) => getAction("company.company/getCompanyBusiness", params),
  member: (params) => getAction("company.member/getStaffList", params),
  getHolderList: (params) => getAction("company.member/getHolderList", params),
  supplierList: (params) => getAction("company.company/getSupplyList", params),
  customerList: (params) => getAction("company.company/getCustormerList", params),
  getTotalOnlabelData: (params) => getAction("company.company/getTotalOnlabelData", params),
}

const xuqiu = {
  submit: (params) => postAction("need.index/submit", params),
  getList: (params) => getAction("need.index/getList", params),
  getDetail: (params) => getAction("need.index/getDetail", params),
  update: (params) => postAction("need.index/updateStatus", params),
}

const chengwuGk = (params) => getAction("set.detail/getInfo", params)

const project = {
  getList: (params) => getAction("project.localproject/getList", params),
  getDetail: (params) => getAction("project.localproject/getDetail", params),
}

const park = {
  getList: (params) => getAction("park.index/getList", params),
  getDetail: (params) => getAction("park.index/getDetail", params),
}

const setting = {
  video: (params) => getAction("set.video/getList", params),
  gg: (params) => getAction("set.ads/getList", params),
}

const product = {
  getList: (params) => getAction("product.index/getList", params),
}
const shop = {
  getList: (params) => getAction("shop.store/getList", params),
  getDetail: (params) => getAction("shop.store/getDetail", params),
}
const common = {
  upload: (params) => uploadAction("common/upload", params),
  getJssdk: (params) => getAction("common/getWxJssdk", params),
}
const login = {
  sendCode: (params) => postAction("common/sendSms", params),
  loginByCode: (params) => postAction("user.login/loginByCode", params),
  login: (params) => postAction("user.login/index", params),
  reg: (params) => postAction("user.register/index", params),
  getInfo: (params) => getAction("user.index/index", params),
}

const meeting = {
  getList: (params) => getAction("meeting.index/getList", params),
  getDetail: (params) => getAction("meeting.index/getDetail", params),
}

const collect = {
  check: (params) => postAction("user.collect/check", params),
  action: (params) => postAction("user.collect/action", params),
  getList: (params) => getAction("user.collect/getList", params),
}

const qijiPro = {
  getList: (params) => getAction("project.qjprojectj/getList", params),
  getDetail: (params) => getAction("project.qjprojectj/getDetail", params),
}


export {
  qijiPro,
  collect,
  meeting,
  getQuestionList,
  parklist,
  GetChainLevelList,
  common,
  chain,
  product,
  xiangxian,
  news,
  company,
  companyNews,
  chengwuGk,
  project,
  park,
  xuqiu,
  setting,
  shop,
  login
}
